home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 6 / FM Towns Free Software Collection 6.iso / ms_dos / mos / source / mos112.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-08  |  500 b   |  23 lines

  1.  
  2. /*
  3.  *
  4.  *    MOS112 : ユ-ザ定義サブル-チンの登録
  5.  *
  6.  */
  7.  
  8. #include <stdio.h>
  9. #include <dos.h>
  10.  
  11. unsigned int MOS_user_routine(unsigned int condition,unsigned int segment,unsigned int offset) {
  12.    union  REGS  inregs, outregs;
  13.    struct SREGS segregs;
  14.  
  15.    segread(&segregs);
  16.    segregs.ds=(unsigned int)segment;
  17.    inregs.x.di=(unsigned int)offset;
  18.    inregs.x.dx=condition;
  19.    inregs.x.ax=0x0B00;
  20.    int86x(0x99,&inregs,&outregs,&segregs);
  21.    return (unsigned int)outregs.h.ah;
  22. }
  23.